package abg.core.common.message;

import com.alibaba.fastjson2.JSONObject;
import lombok.Data;

@Data
public class RedisMsg {
    /**
     * @see RedisMsgType
     * @see RedisMsgKit#sendMsg(RedisMsgType msgType, String dataJsonStr)
     */
    private String channel;

    /**
     * @see RedisMsgType
     * @see RedisMsgKit#sendMsg(RedisMsgType msgType, String dataJsonStr)
     */
    private String type;

    /**
     * @see RedisMsgType
     * @see RedisMsgKit#sendMsg(RedisMsgType msgType, String dataJsonStr)
     */
    private String desc;

    /**
     * @see RedisMsgKit#sendMsg(RedisMsgType msgType, String dataJsonStr)
     */
    private String data;

    public JSONObject getData() {
        return JSONObject.parseObject(data);
    }
}
